package com.hs.srm.admin.common.thread;

import java.util.Map;

import cn.hutool.log.Log;
import cn.hutool.log.LogFactory;

import com.hs.srm.base.modules.sys.service.NoticeService;

/**
 * @author clement
 * @description:
 * @date: Create in 14:43 2018/6/30
 */
public class NoticeSendThread extends Thread {

    private static final Log log = LogFactory.get();

    private Long recieveId;
    private String sysCode;
    private Map<String, String> params;
    private NoticeService noticeService;

    /**
     * 初始化线程对象
     * @param noticeService
     * @param recieveId
     * @param sysCode
     * @param params
     */
    public NoticeSendThread(NoticeService noticeService, Long recieveId, String sysCode, Map<String, String> params){
        this.noticeService = noticeService;
        this.recieveId = recieveId;
        this.sysCode = sysCode;
        this.params = params;
    }

    @Override
    public void run() {
        log.debug("消息发送线程开始。。。");
        noticeService.sendNotice(recieveId, sysCode, params);

    }
}
